<style>
.tfield{border:1px solid #CCCCCC;width:250px;}
a.amo {
	color: #00A94F;
	text-decoration: none;
    cursor: pointer;
}

</style>
<div align="center">
<div style="width: 660px;" align="left">
<h1>Send to a friend</h1>
<?php
if(!empty($Message))
{
    echo '<div align=center>'.$Message.'</div><br><br>';
    return;
}
if(!empty($error))
{
    echo '<div align=center>'.$error.'</div><br><br>';
}
?>
	<form method="post" action="/as/sendfriend" onsubmit="return checkform(this)">
    <input type="hidden" name="newsname" value="<?php echo $html->getContent('cName')?>" />
	<table border="0" cellspacing="5">
		<tbody><tr>
			<td valign="top">
				Your email address</td>
			<td valign="top">
				<input class="tfield" name="youremail" /></td>
			<td>&nbsp;</td><td>&nbsp;</td>
		</tr>
		<tr>
			<td valign="top">
				Your name			</td>
			<td valign="top">
				<input class="tfield" name="yourname" value="" size="68" maxlength="40" type="text">			</td>

			<td>&nbsp;</td><td>&nbsp;</td>
		</tr>
		<tr>
			<td valign="top">
				Your friend's email			</td>
			<td valign="top">
				<input class="tfield" name="email1" value="" size="68" maxlength="40" type="text"></td>
			<td align="left"><a class="amo" onclick="showmoresend()" >+ Send to more friends</a>

			</td>
			<td>&nbsp;</td>
		</tr>
        <tr ID="emailtext2" style="display:none">
			<td valign="top">
				Your friend's email			</td>

			<td valign="top">
				<input class="tfield" type="text" name="email2" value=""  />			</td>
			<td>&#160;</td><td>&#160;</td>
		</tr>
		<tr ID="emailtext3" style="display:none">
			<td valign="top">
				Your friend's email			</td>
			<td valign="top">

				<input class="tfield" type="text" name="email3" value="" />			</td>
			<td>&#160;</td><td>&#160;</td>
		</tr>
	
		<tr>
			<td valign="top">
				Optional message			</td>
			<td valign="top">
				<textarea class="tfield" name="message" maxlength="200" rows="4" cols="35"></textarea>
			</td>
			<td>&nbsp;</td><td>&nbsp;</td>
		</tr>
        <tr>
            <td></td>
            <td><input value="Submit" name="submit" type="submit"></td>
        </tr>
	</tbody></table>
	
	</form>
</div>
</div>
<script>
function checkform(f)
{
    if(f.youremail.value=='')
    {
        alert('<?php echo __('Please enter your email')?>');
        return false;
    }
    if(f.yourname.value=='')
    {
        alert('<?php echo __('Please enter your name')?>');
        return false;
    }
     if(f.email1.value=='')
    {
        alert("<?php echo __('Please enter your friend\'s email')?>");
        return false;
    }
}

function showmoresend()
{
    oj1=document.getElementById('emailtext2');
    oj2=document.getElementById('emailtext3');
    if(oj1.style.display=='none')
    {
        oj1.style.display='';
        oj2.style.display='';
    }else
    {
        oj1.style.display='none';
        oj2.style.display='none';
    }
}
</script>